/* Custom AI Fabrix Documentation Styles - eSystems Branding */

/* eSystems Color Palette */
:root {
    --esystems-primary: #2c5aa0;      /* eSystems primary blue */
    --esystems-secondary: #1a365d;    /* eSystems dark blue */
    --esystems-accent: #4299e1;       /* eSystems light blue */
    --esystems-text: #2d3748;         /* eSystems text color */
    --esystems-light: #f7fafc;        /* eSystems light background */
    --esystems-white: #ffffff;        /* White */
}

/* Header styling with eSystems branding */
.header-area {
    background: var(--esystems-secondary) !important;
    background-image: none !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Navigation styling */
.navigation-navbar ul li a {
    color: var(--esystems-white) !important;
    font-weight: 500;
    transition: color 0.3s ease;
    white-space: nowrap;
    padding: 8px 12px;
}

.navigation-navbar ul li a:hover,
.navigation-navbar ul li.active a {
    color: var(--esystems-accent) !important;
}

/* Dropdown submenu styling - fix color contrast */
.themeix-dropdown-item {
    background-color: var(--esystems-white) !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 6px !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15) !important;
    padding: 8px 0 !important;
    min-width: 280px !important;
    max-width: 350px !important;
    width: auto !important;
}

.themeix-dropdown-item li {
    margin: 0 !important;
    padding: 0 !important;
}

.themeix-dropdown-item li a {
    color: #2d3748 !important;
    background-color: transparent !important;
    padding: 12px 20px !important;
    display: block !important;
    transition: all 0.3s ease !important;
    border: none !important;
    font-weight: 500 !important;
    text-decoration: none !important;
    white-space: normal !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
    line-height: 1.4 !important;
    hyphens: auto !important;
}

/* Force dropdown text to be dark and visible */
.navigation-navbar .themeix-dropdown-item li a,
.header-navigation .themeix-dropdown-item li a,
.themeix-dropdown .themeix-dropdown-item li a {
    color: #2d3748 !important;
    background-color: transparent !important;
}

/* Ensure dropdown text is never white */
.themeix-dropdown-item a,
.themeix-dropdown-item li a,
.themeix-dropdown-item ul li a {
    color: #2d3748 !important;
}

/* Override any theme styles that might be making text white */
.slimmenu .themeix-dropdown-item li a,
.slimmenu .themeix-dropdown-item a,
#navigation-menu .themeix-dropdown-item li a,
#navigation-menu .themeix-dropdown-item a {
    color: #2d3748 !important;
    background-color: transparent !important;
}

/* Force all dropdown links to be dark */
.themeix-dropdown-item * {
    color: #2d3748 !important;
}

.themeix-dropdown-item a,
.themeix-dropdown-item li a {
    color: #2d3748 !important;
}

.themeix-dropdown-item li a:hover,
.themeix-dropdown-item li.active a {
    color: var(--esystems-white) !important;
    background-color: var(--esystems-primary) !important;
    padding-left: 25px !important;
}

.themeix-dropdown-item li.active a {
    background-color: var(--esystems-secondary) !important;
    font-weight: 600 !important;
}

/* Fix navigation layout for more items */
.navigation-navbar ul {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

.navigation-navbar ul li {
    margin: 0 2px;
}

/* Ensure navigation doesn't wrap awkwardly */
.header-navigation {
    min-height: 80px;
    display: flex;
    align-items: center;
}

.navigation-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.navigation-right {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

/* Ensure dropdown appears above other content */
/* Note: header-navigation has z-index: 2222, and flex-wrap creates multiple rows with stacking contexts */
/* Dropdowns need very high z-index to appear above any wrapped navigation items */
.themeix-dropdown {
    position: relative;
    z-index: 9999;
}

.themeix-dropdown-item {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.themeix-dropdown:hover .themeix-dropdown-item {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Mobile dropdown adjustments */
@media (max-width: 768px) {
    .themeix-dropdown-item {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        background-color: var(--esystems-light) !important;
        margin-top: 5px;
    }
    
    .themeix-dropdown-item li a {
        color: #2d3748 !important;
        padding: 8px 15px !important;
        white-space: normal !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        word-wrap: break-word !important;
        line-height: 1.4 !important;
        background-color: transparent !important;
    }
    
    .themeix-dropdown-item li a:hover {
        background-color: var(--esystems-primary) !important;
        color: var(--esystems-white) !important;
    }
}

/* Override all background patterns with eSystems colors */
.bg-cover1 {
    background: linear-gradient(135deg, var(--esystems-secondary), var(--esystems-primary)) !important;
    background-image: none !important;
}

/* Force slider area to use secondary color */
.slider-area {
    background: var(--esystems-secondary) !important;
    background-image: none !important;
}

.slider-area.bg-cover1 {
    background: var(--esystems-secondary) !important;
    background-image: none !important;
}

.page-title-area.bg-cover1 {
    background-image: none !important;
}

/* Ensure page title text is visible */
.page-title-area .page-title,
.page-title-area .heading-1,
.page-title-area h1 {
    color: var(--esystems-white) !important;
}

.page-title-area .white-text {
    color: var(--esystems-white) !important;
}

/* Force page title area background - use solid secondary color */
section.page-title-area {
    background: var(--esystems-secondary) !important;
    background-image: none !important;
}

/* Ensure all text in page title area is white */
section.page-title-area * {
    color: var(--esystems-white) !important;
}

/* Loading screen with eSystems secondary color */
.loading-main {
    background-color: var(--esystems-secondary) !important;
}

/* Home top arrow styling */
.home-top {
    background-color: var(--esystems-secondary) !important;
    color: var(--esystems-white) !important;
    border: 2px solid var(--esystems-white) !important;
}

.home-top:hover {
    background-color: var(--esystems-white) !important;
    color: var(--esystems-secondary) !important;
    border: 2px solid var(--esystems-secondary) !important;
}

.home-top i {
    color: inherit !important;
}

/* Fix page header spacing and positioning - increase top padding to avoid navigation overlap */
.page-title-area .section-spacing {
    padding-top: 140px !important;
    padding-bottom: 40px !important;
}

.page-title-wrapper {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

/* Ensure page title doesn't overlap with navigation */
.page-title-area {
    margin-top: 80px !important;
}

@media (max-width: 768px) {
    .page-title-area .section-spacing {
        padding-top: 120px !important;
        padding-bottom: 30px !important;
    }
    
    .page-title-area {
        margin-top: 70px !important;
    }
}

/*Spacing*/
.section-spacing {
    padding-top: 30px;
  }
  @media (min-width: 768px) and (max-width: 991px) {
    .section-spacing {
      padding-top: 30px;
    }
  }
  @media (max-width: 768px) {
    .section-spacing {
      padding-top: 30px;
    }
  }

.bg-cover2 {
    background: linear-gradient(135deg, var(--esystems-secondary), var(--esystems-primary)) !important;
    background-image: none !important;
}

/* Button styling with eSystems colors */
.btn-primary,
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary.active,
.themeix-btn,
.themeix-btn:hover,
.themeix-btn:focus,
.themeix-btn:active,
.themeix-btn.active,
.themeix-btn-primary,
.themeix-btn-primary:hover,
.themeix-btn-primary:focus,
.themeix-btn-primary:active,
.themeix-btn-primary.active {
    background-color: var(--esystems-primary) !important;
    border-color: var(--esystems-primary) !important;
    color: var(--esystems-white) !important;
}

/* Override ALL button styles to match eSystems branding */
.btn,
.btn:hover,
.btn:focus,
.btn:active,
.btn-style1,
.btn-style1:hover,
.btn-style1:focus,
.btn-style1:active,
.btn-style2,
.btn-style2:hover,
.btn-style2:focus,
.btn-style2:active,
.btn-style3,
.btn-style3:hover,
.btn-style3:focus,
.btn-style3:active,
.slider-content .btn,
.slider-content .btn:hover,
.slider-content .btn:focus,
.slider-content .btn:active,
.looking-for-service .btn,
.looking-for-service .btn:hover,
.looking-for-service .btn:focus,
.looking-for-service .btn:active,
button,
button:hover,
button:focus,
button:active,
input[type="submit"],
input[type="submit"]:hover,
input[type="submit"]:focus,
input[type="submit"]:active,
input[type="button"],
input[type="button"]:hover,
input[type="button"]:focus,
input[type="button"]:active {
    background-color: var(--esystems-primary) !important;
    color: var(--esystems-white) !important;
    border: 2px solid var(--esystems-primary) !important;
    font-weight: 600 !important;
    padding: 12px 24px !important;
    border-radius: 6px !important;
    transition: all 0.3s ease !important;
    text-decoration: none !important;
    cursor: pointer !important;
}

.btn:hover,
.btn:focus,
.btn:active,
.btn-style1:hover,
.btn-style1:focus,
.btn-style1:active,
.btn-style2:hover,
.btn-style2:focus,
.btn-style2:active,
.btn-style3:hover,
.btn-style3:focus,
.btn-style3:active,
.slider-content .btn:hover,
.slider-content .btn:focus,
.slider-content .btn:active,
.looking-for-service .btn:hover,
.looking-for-service .btn:focus,
.looking-for-service .btn:active,
button:hover,
button:focus,
button:active,
input[type="submit"]:hover,
input[type="submit"]:focus,
input[type="submit"]:active,
input[type="button"]:hover,
input[type="button"]:focus,
input[type="button"]:active {
    background-color: var(--esystems-white) !important;
    color: var(--esystems-secondary) !important;
    border: 2px solid var(--esystems-secondary) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2) !important;
}

/* Link colors */
a {
    color: var(--esystems-primary) !important;
    transition: color 0.3s ease;
}

a:hover,
a:focus,
a:active {
    color: var(--esystems-accent) !important;
}

/* Page content styling */
body {
    color: var(--esystems-text) !important;
    background-color: var(--esystems-white) !important;
}

/* Main content area */
.layout-area {
    background-color: var(--esystems-white) !important;
}

/* Sidebar styling */
.custom-links {
    background: var(--esystems-light) !important;
    border: 1px solid var(--esystems-light);
}

.custom-links h5 {
    color: var(--esystems-primary) !important;
}

.doc-right-sidebar {
    background: var(--esystems-light) !important;
    border: 1px solid var(--esystems-light);
}

.doc-right-sidebar h5 {
    color: var(--esystems-primary) !important;
}

/* Container width adjustment */
.container {
    max-width: 90% !important;
}

/* Ensure proper spacing */
.layout-wrapper {
    max-width: 90%;
    margin: 0 auto;
}

/* Fix any potential layout issues */
.tutorial-content {
    max-width: 100%;
}

/* Ensure sidebar works properly */
.doc-sidebar-menu {
    position: sticky;
    top: 20px;
}

/* Custom links styling */
.custom-links {
    background: var(--esystems-light);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.custom-links h5 {
    color: var(--esystems-secondary);
    margin-bottom: 15px;
    font-weight: 600;
}

.custom-links ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.custom-links li {
    margin-bottom: 8px;
}

.custom-links a {
    color: var(--esystems-text);
    text-decoration: none;
    padding: 5px 0;
    display: block;
    transition: all 0.3s ease;
    font-weight: 500;
}

.custom-links a:hover,
.custom-links li.active a {
    color: var(--esystems-secondary);
    font-weight: 500;
    border-left: 3px solid var(--esystems-primary);
    padding-left: 12px;
}

/* Table of contents styling */
.doc-right-sidebar {
    background: var(--esystems-light);
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
}

.doc-right-sidebar h5 {
    color: var(--esystems-secondary);
    margin-bottom: 15px;
    font-weight: 600;
}

/* Footer contact styling */
.footer-contact {
    margin-top: 15px;
}

.footer-subtitle {
    color: var(--esystems-secondary);
    font-weight: 600;
    margin-bottom: 10px;
}

/* Footer navigation links styling */
.footer-category a,
.footer-contact a,
.footer-socials a {
    color: var(--esystems-text) !important;
    transition: color 0.3s ease !important;
}

.footer-category a:hover,
.footer-contact a:hover,
.footer-socials a:hover {
    color: var(--esystems-text) !important;
}

.footer-socials a {
    display: inline-block;
    width: 40px;
    height: 40px;
    background-color: var(--esystems-primary);
    color: var(--esystems-white) !important;
    text-align: center;
    line-height: 40px;
    border-radius: 50%;
    margin-right: 10px;
    transition: all 0.3s ease;
}

.footer-socials a:hover {
    background-color: var(--esystems-secondary) !important;
    color: var(--esystems-white) !important;
    transform: translateY(-2px);
}

.contact-item {
    margin-bottom: 8px;
    display: flex;
    align-items: center;
}

.contact-item a {
    color: #666;
    text-decoration: none;
}

.contact-item a:hover {
    color: var(--esystems-primary);
}

/* Topics area card styling */
.topics-icon {
    text-align: center;
    margin-bottom: 15px;
}

.topics-service {
    text-align: center;
    padding: 30px 20px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.topics-service p {
    flex-grow: 1;
    margin-bottom: 20px;
}

.looking-for-content h4 {
    color: var(--esystems-text) !important;
}
.looking-for-content:hover h4 {
    color: var(--esystems-white) !important;
}

/* Search modal close button margins */
.modal-header .close {
    margin-top: -2px !important;
    margin-right: 8px !important;
    padding: 8px !important;
    background-color: var(--esystems-primary) !important;
    color: var(--esystems-white) !important;
    border-radius: 4px !important;
    border: none !important;
    opacity: 1 !important;
}

.modal-header .close:hover {
    background-color: var(--esystems-secondary) !important;
    color: var(--esystems-white) !important;
}

/* Mobile navigation text color */
@media (max-width: 768px) {
    .header-navigation .navigation-box #navigation-menu li a {
        color: var(--esystems-text) !important;
    }
    
    .header-navigation .navigation-box #navigation-menu li.has-submenu ul li a {
        color: var(--esystems-text) !important;
    }
}

/* Testimonial/Feedback styling improvements */
.testimonial-area {
    background: var(--esystems-light) !important;
}

.testimonial-item {
    background: var(--esystems-white) !important;
    border-radius: 8px !important;
    padding: 30px !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1) !important;
    margin-bottom: 30px !important;
    transition: all 0.3s ease !important;
}

.testimonial-item:hover {
    transform: translateY(-5px) !important;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15) !important;
}

.testimonial-author img {
    width: 80px !important;
    height: 80px !important;
    border: 3px solid var(--esystems-primary) !important;
    object-fit: cover !important;
}

.testimonial-content p {
    color: var(--esystems-text) !important;
    font-style: italic !important;
    line-height: 1.6 !important;
    margin-bottom: 20px !important;
}

.testimonial-name a {
    color: var(--esystems-secondary) !important;
    font-weight: 600 !important;
    text-decoration: none !important;
}

.testimonial-name a:hover {
    color: var(--esystems-primary) !important;
}

.testimonial-subname {
    color: var(--esystems-text) !important;
    font-weight: 400 !important;
    opacity: 0.8 !important;
}

/* Star rating styling */
.ef-rating {
    margin-bottom: 15px !important;
}

.ef-rating__value {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ffc107'%3E%3Cpath d='M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z'/%3E%3C/svg%3E") !important;
}

/* Section title styling */
.testimonial-area .section-title h2 {
    color: var(--esystems-secondary) !important;
    font-weight: 700 !important;
}

.testimonial-area .section-title p {
    color: var(--esystems-text) !important;
    opacity: 0.8 !important;
}

/* Testimonial carousel navigation styling */
.testimonial-slider .owl-nav {
    text-align: center !important;
    margin-top: 40px !important;
}

.testimonial-slider .owl-prev,
.testimonial-slider .owl-next {
    background: var(--esystems-primary) !important;
    color: var(--esystems-white) !important;
    border: 2px solid var(--esystems-primary) !important;
    border-radius: 50% !important;
    width: 50px !important;
    height: 50px !important;
    margin: 0 10px !important;
    font-size: 18px !important;
    font-weight: bold !important;
    transition: all 0.3s ease !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
}

.testimonial-slider .owl-prev:hover,
.testimonial-slider .owl-next:hover {
    background: var(--esystems-white) !important;
    color: var(--esystems-secondary) !important;
    border: 2px solid var(--esystems-secondary) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2) !important;
}

.testimonial-slider .owl-prev:before,
.testimonial-slider .owl-next:before {
    display: none !important;
}

.testimonial-slider .owl-prev span,
.testimonial-slider .owl-next span {
    display: block !important;
    font-size: 24px !important;
    line-height: 1 !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .container {
        max-width: 95% !important;
    }
    
    .layout-wrapper {
        max-width: 95%;
    }
}

/* CRITICAL: Force dropdown text to be visible - maximum specificity */
/* Also ensure dropdowns appear above any wrapped navigation rows */
body .header-navigation .navigation-navbar .slimmenu .themeix-dropdown .themeix-dropdown-item li a,
body .header-navigation .navigation-navbar .slimmenu .themeix-dropdown .themeix-dropdown-item a,
body .header-navigation .navigation-navbar #navigation-menu .themeix-dropdown .themeix-dropdown-item li a,
body .header-navigation .navigation-navbar #navigation-menu .themeix-dropdown .themeix-dropdown-item a {
    color: #2d3748 !important;
    background-color: transparent !important;
    opacity: 1 !important;
    visibility: visible !important;
    z-index: 10000 !important;
}

/* Ensure dropdown containers appear above all navigation elements */
body .header-navigation .navigation-navbar .slimmenu .themeix-dropdown,
body .header-navigation .navigation-navbar #navigation-menu .themeix-dropdown {
    z-index: 9999 !important;
}

body .header-navigation .navigation-navbar .slimmenu .themeix-dropdown .themeix-dropdown-item,
body .header-navigation .navigation-navbar #navigation-menu .themeix-dropdown .themeix-dropdown-item {
    z-index: 10000 !important;
}
